package basic;
//判断一个方法是否是重载方法的原则：方法名相同，参数类型或参数个数不同
//方法内部遇到return时返回，返回类型为void表示不返回任何值
public class Student {
    public  void study(){
        System.out.println("同学真好学！");
    }
    public  void study(String name){
        System.out.println(name + "同学真好学！");
    }
    public  void study(String name, int age){
        System.out.println(name + "同学真好学！" + "他今年" + age + "岁了");
    }

    public static void main(String[] args) {
        Student student = new Student();
        student.study();
        student.study("Colorful");
        student.study("小木",20);
    }
}
